Repository navigation
perf(agc): memoize source failures of draw stages as for compute - #422
Merged
oneandonlydean merged 1 commit intoOct 4, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
The source-handle memo poisoned only compute failures, so a draw stage whose resource walk cannot resolve was recompiled, and threw, on every draw. Draw stages are now poisoned too, keyed with the linked programs, and a memoized failure rejects the draw without an exception. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8 of 9 tasks
Collaborator
|
+1. My integration branch has carried a version of this without the linked-program key. On PPSA21564's world map, unwinding these repeated throws took about 19% of the queue worker's time on Linux (the guest libc's unwinder calls dl_iterate_phdr for every frame), and memoizing the draw-stage failures removed it. I'll switch my branch to this version, since it also keys on the linked programs. |
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 3, 2026
…#422 boykopovar#422 (MichonGoddijn231849) memoizes the same draw-stage source failures and also keys the memo on the role and code address of every linked program, which bab8026 lacked. It is picked after this integration's merge; the draw-ahead path is adapted to it there. This reverts commit bab8026.
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 3, 2026
…paration boykopovar#422's compileDrawStage reports a memoized source failure through its `rejected` argument. prepareDrawAhead (local) passes one and gives up the preparation on a failure, so the worker draws as before and rejects the draw from the memo without a throw, as bab8026's DrawPrepare hunk did. The Pm4 test from bab8026 (a vertex stage's failure is memoized, answered without a throw only to a caller that asks, and not for another context) covers boykopovar#422's memo.
Merged
9 tasks done
9 tasks done
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
SourceHandleForremembers a source that failed to resolve and answers later lookups with the stored failure, but only for compute stages. A draw stage that cannot be resolved was resolved again on every draw: GTA V draws whose descriptor came through a lane-dependent chain repeated the walk and threw each time.compileDrawStagetakes the memoized failure through the existingpoisonedout-parameter. The draw is rejected with that message instead of an exception, asDispatchalready does.Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
ctest: all tests pass.APS5_PROFILE_DRAW=1:Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositorycompileDrawStagecall inDraw.cpp; whichever merges second keeps both changes🤖 Generated with Claude Code